package com.ruoyi.labsafety.domain;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.labdata.domain.LabFile;
import com.ruoyi.labdata.domain.LabFlowInstance;

/**
 * 安全检查单对象 lab_safety_check_form
 * 
 * @author winner pan
 * @date 2022-03-27
 */
public class LabSafetyCheckForm extends LabFlowInstance
{
    private static final long serialVersionUID = 1L;
    /**
     * 危化品采购业务类型.
     */
    private static final String businessTypeOpt = "safetyCheck";

    public LabSafetyCheckForm() {
        super.setBusinessTypeOpt(businessTypeOpt);
    }

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 安检类型 */
    @Excel(name = "安检类型")
    private String safetyCheckOpt;
    
    public String getApplyScope(){
    	if(this.safetyCheckOpt==null){
    		return null;
    	}
    	if(Integer.valueOf(this.safetyCheckOpt)<=3){
    		return "university";
    	}else{
    		return "academy";
    	}
    }

    /** 任务周期 */
    @Excel(name = "任务周期")
    private String taskCycleOpt;

    /** 任务开始 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务开始", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 整改报告 */
    @Excel(name = "整改报告")
    private String rectificationTypeOpt;

    /** 任务详情 */
    @Excel(name = "任务详情")
    private String taskDescription;

    /** 安检模板 */
    @Excel(name = "安检模板")
    private String safetyTemplateOpt;

    /** 周期版次 */
    @Excel(name = "周期版次")
    private String checkFrequencyOpt;

    /** 任务结束 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务结束", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 整改期限 */
    @Excel(name = "整改期限")
    private Long rectificationPeriod;

    /** 发起机构部门 */
    @Excel(name = "发起机构部门")
    private Long ownerOrgId;

    /** 任务状态 */
    @Excel(name = "任务状态")
    private String status;
    
    private Long jobId;
    
    private Integer countNum;
    
    public Integer getCountNum() {
		return countNum;
	}

	public void setCountNum(Integer countNum) {
		this.countNum = countNum;
	}

	public Long getJobId() {
		return jobId;
	}

	public void setJobId(Long jobId) {
		this.jobId = jobId;
	}

	/** 复核人员 */
    @Excel(name = "复核人员")
    private String reviewUsers;

    // 检查人员
    private String checkUsers;
    // 检查目标
    private String checkTargetOrgs;

    // 安检模板列表
    private String[] safetyTemplateOptArray;

    // 安检数据列表
    private List<LabSafetyCheckIndex> labSafetyCheckIndexList;

    // 附件
    private List<LabFile> files;

    public List<LabSafetyCheckIndex> getLabSafetyCheckIndexList() {
        return labSafetyCheckIndexList;
    }

    public void setLabSafetyCheckIndexList(List<LabSafetyCheckIndex> labSafetyCheckIndexList) {
        this.labSafetyCheckIndexList = labSafetyCheckIndexList;
    }

    public List<LabFile> getFiles() {
        return files;
    }

    public void setFiles(List<LabFile> files) {
        this.files = files;
    }

    public String getCheckUsers() {
        return checkUsers;
    }

    public void setCheckUsers(String checkUsers) {
        this.checkUsers = checkUsers;
    }

    public String getCheckTargetOrgs() {
        return checkTargetOrgs;
    }

    public void setCheckTargetOrgs(String checkTargetOrgs) {
        this.checkTargetOrgs = checkTargetOrgs;
    }

    public void setTaskName(String taskName)
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setSafetyCheckOpt(String safetyCheckOpt)
    {
        this.safetyCheckOpt = safetyCheckOpt;
    }

    public String getSafetyCheckOpt()
    {
        return safetyCheckOpt;
    }
    public void setTaskCycleOpt(String taskCycleOpt)
    {
        this.taskCycleOpt = taskCycleOpt;
    }

    public String getTaskCycleOpt()
    {
        return taskCycleOpt;
    }
    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }
    public void setRectificationTypeOpt(String rectificationTypeOpt)
    {
        this.rectificationTypeOpt = rectificationTypeOpt;
    }

    public String getRectificationTypeOpt()
    {
        return rectificationTypeOpt;
    }
    public void setTaskDescription(String taskDescription) 
    {
        this.taskDescription = taskDescription;
    }

    public String getTaskDescription() 
    {
        return taskDescription;
    }
    public void setSafetyTemplateOpt(String safetyTemplateOpt)
    {
        this.safetyTemplateOpt = safetyTemplateOpt;
    }

    public String getSafetyTemplateOpt()
    {
        return safetyTemplateOpt;
    }
    public void setCheckFrequencyOpt(String checkFrequencyOpt)
    {
        this.checkFrequencyOpt = checkFrequencyOpt;
    }

    public String getCheckFrequencyOpt()
    {
        return checkFrequencyOpt;
    }
    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }
    public void setRectificationPeriod(Long rectificationPeriod) 
    {
        this.rectificationPeriod = rectificationPeriod;
    }

    public Long getRectificationPeriod() 
    {
        return rectificationPeriod;
    }
    public void setOwnerOrgId(Long ownerOrgId) 
    {
        this.ownerOrgId = ownerOrgId;
    }

    public Long getOwnerOrgId() 
    {
        return ownerOrgId;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setReviewUsers(String reviewUsers) 
    {
        this.reviewUsers = reviewUsers;
    }

    public String getReviewUsers() 
    {
        return reviewUsers;
    }

    public String[] getSafetyTemplateOptArray() {
        return safetyTemplateOptArray;
    }

    public void setSafetyTemplateOptArray(String[] safetyTemplateOptArray) {
        this.safetyTemplateOptArray = safetyTemplateOptArray;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("instanceId", getInstanceId())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("taskName", getTaskName())
            .append("safetyCheckOpt", getSafetyCheckOpt())
            .append("taskCycleOpt", getTaskCycleOpt())
            .append("startDate", getStartDate())
            .append("rectificationTypeOpt", getRectificationTypeOpt())
            .append("taskDescription", getTaskDescription())
            .append("safetyTemplateOpt", getSafetyTemplateOpt())
            .append("checkFrequencyOpt", getCheckFrequencyOpt())
            .append("endDate", getEndDate())
            .append("rectificationPeriod", getRectificationPeriod())
            .append("ownerOrgId", getOwnerOrgId())
            .append("status", getStatus())
            .append("reviewUsers", getReviewUsers())
            .toString();
    }
}
